home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / CIncludes / MoviesFormat.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  18.8 KB  |  713 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        MoviesFormat.h
  3.  
  4.      Contains:    QuickTime Interfaces.
  5.  
  6.      Version:    Technology:    QuickTime 3.0
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1990-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __MOVIESFORMAT__
  18. #define __MOVIESFORMAT__
  19.  
  20. #ifndef __MACTYPES__
  21. #include <MacTypes.h>
  22. #endif
  23. #ifndef __MOVIES__
  24. #include <Movies.h>
  25. #endif
  26.  
  27.  
  28.  
  29. #if PRAGMA_ONCE
  30. #pragma once
  31. #endif
  32.  
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36.  
  37. #if PRAGMA_IMPORT
  38. #pragma import on
  39. #endif
  40.  
  41. #if PRAGMA_STRUCT_ALIGN
  42.     #pragma options align=mac68k
  43. #elif PRAGMA_STRUCT_PACKPUSH
  44.     #pragma pack(push, 2)
  45. #elif PRAGMA_STRUCT_PACK
  46.     #pragma pack(2)
  47. #endif
  48.  
  49.  
  50. enum {
  51.     kMovieVersion                = 0                                /* version number of the format here described */
  52. };
  53.  
  54. /****************************************
  55. *
  56. *   General Types -
  57. *        These types are used in more than one of the
  58. *        directory types.
  59. *
  60. ****************************************/
  61. /* MoviesUserData is the type used for user data in movie and track directories */
  62.  
  63. struct MoviesUserData {
  64.     long                             size;                        /* size of this user data */
  65.     long                             udType;                        /* type of user data */
  66.     char                             data[1];                    /* the user data */
  67. };
  68. typedef struct MoviesUserData            MoviesUserData;
  69.  
  70. struct UserDataAtom {
  71.     long                             size;
  72.     long                             atomType;
  73.     MoviesUserData                     userData[1];
  74. };
  75. typedef struct UserDataAtom                UserDataAtom;
  76. /* MoviesDataDescription tells us where the data for the movie or track lives.
  77.    The data can follow the directory, be in the datafork of the same file as the directory resource,
  78.    be in the resource fork of the same file as the directory resource, be in another file in the
  79.    data fork or resource fork, or require a specific bottleneck to fetch the data. */
  80. /****************************************
  81. *
  82. *   MediaDirectory information -
  83. *        The MediaDirectory is tightly coupled to the data.
  84. *
  85. ****************************************/
  86.  
  87.  
  88. struct SampleDescriptionAtom {
  89.     long                             size;
  90.     long                             atomType;                    /* = 'stsd' */
  91.     long                             flags;                        /* 1 byte of version / 3 bytes of flags */
  92.     long                             numEntries;
  93.     SampleDescription                 sampleDescTable[1];
  94. };
  95. typedef struct SampleDescriptionAtom    SampleDescriptionAtom;
  96. /* TimeToSampleNum maps physical sample time to physical sample number. */
  97.  
  98. struct TimeToSampleNum {
  99.     long                             sampleCount;
  100.     TimeValue                         sampleDuration;
  101. };
  102. typedef struct TimeToSampleNum            TimeToSampleNum;
  103.  
  104. struct TimeToSampleNumAtom {
  105.     long                             size;
  106.     long                             atomType;                    /* = 'stts' */
  107.     long                             flags;                        /* 1 byte of version / 3 bytes of flags */
  108.     long                             numEntries;
  109.     TimeToSampleNum                 timeToSampleNumTable[1];
  110. };
  111. typedef struct TimeToSampleNumAtom        TimeToSampleNumAtom;
  112. /* SyncSamples is a list of the physical samples which are self contained. */
  113.  
  114. struct SyncSampleAtom {
  115.     long                             size;
  116.     long                             atomType;                    /* = 'stss' */
  117.     long                             flags;                        /* 1 byte of version / 3 bytes of flags */
  118.     long                             numEntries;
  119.     long                             syncSampleTable[1];
  120. };
  121. typedef struct SyncSampleAtom            SyncSampleAtom;
  122. /* SampleToChunk maps physical sample number to chunk number. */
  123. /* same as SampleToChunk, but redundant first sample is removed */
  124.  
  125. struct SampleToChunk {
  126.     long                             firstChunk;
  127.     long                             samplesPerChunk;
  128.     long                             sampleDescriptionID;
  129. };
  130. typedef struct SampleToChunk            SampleToChunk;
  131.  
  132. struct SampleToChunkAtom {
  133.     long                             size;
  134.     long                             atomType;                    /* = 'stsc' */
  135.     long                             flags;                        /* 1 byte of version / 3 bytes of flags */
  136.     long                             numEntries;
  137.     SampleToChunk                     sampleToChunkTable[1];
  138. };
  139. typedef struct SampleToChunkAtom        SampleToChunkAtom;
  140.  
  141. struct ChunkOffsetAtom {
  142.     long                             size;
  143.     long                             atomType;                    /* = 'stco' */
  144.     long                             flags;                        /* 1 byte of version / 3 bytes of flags */
  145.     long                             numEntries;
  146.     long                             chunkOffsetTable[1];
  147. };
  148. typedef struct ChunkOffsetAtom            ChunkOffsetAtom;
  149.  
  150. struct SampleSizeAtom {
  151.     long                             size;
  152.     long                             atomType;                    /* = 'stsz' */
  153.     long                             flags;                        /* 1 byte of version / 3 bytes of flags */
  154.     long                             sampleSize;
  155.     long                             numEntries;
  156.     long                             sampleSizeTable[1];
  157. };
  158. typedef struct SampleSizeAtom            SampleSizeAtom;
  159.  
  160. struct ShadowSync {
  161.     long                             fdSampleNum;
  162.     long                             syncSampleNum;
  163. };
  164. typedef struct ShadowSync                ShadowSync;
  165.  
  166. struct ShadowSyncAtom {
  167.     long                             size;
  168.     long                             atomType;                    /* = 'stsz' */
  169.     long                             flags;                        /* 1 byte of version / 3 bytes of flags */
  170.     long                             numEntries;
  171.     ShadowSync                         shadowSyncTable[1];
  172. };
  173. typedef struct ShadowSyncAtom            ShadowSyncAtom;
  174.  
  175. struct SampleTableAtom {
  176.     long                             size;
  177.     long                             atomType;                    /* = 'stbl' */
  178.  
  179.     SampleDescriptionAtom             sampleDescription;
  180.     TimeToSampleNumAtom             timeToSampleNum;
  181.     SampleToChunkAtom                 sampleToChunk;
  182.     SyncSampleAtom                     syncSample;
  183.     SampleSizeAtom                     sampleSize;
  184.     ChunkOffsetAtom                 chunkOffset;
  185.     ShadowSyncAtom                     shadowSync;
  186. };
  187. typedef struct SampleTableAtom            SampleTableAtom;
  188.  
  189. struct PublicHandlerInfo {
  190.     long                             flags;                        /* 1 byte of version / 3 bytes of flags */
  191.  
  192.     long                             componentType;
  193.     long                             componentSubType;
  194.     long                             componentManufacturer;
  195.     long                             componentFlags;
  196.     long                             componentFlagsMask;
  197.     char                             componentName[1];
  198. };
  199. typedef struct PublicHandlerInfo        PublicHandlerInfo;
  200.  
  201. struct HandlerAtom {
  202.     long                             size;
  203.     long                             atomType;                    /* = 'hdlr' */
  204.  
  205.     PublicHandlerInfo                 hInfo;
  206. };
  207. typedef struct HandlerAtom                HandlerAtom;
  208. /* a data reference is a private structure */
  209.  
  210. typedef long                             DataRefAtom;
  211.  
  212. struct DataInfoAtom {
  213.     long                             size;
  214.     long                             atomType;                    /* = 'dinf' */
  215.  
  216.     DataRefAtom                     dataRef;
  217. };
  218. typedef struct DataInfoAtom                DataInfoAtom;
  219.  
  220. struct RgnAtom {
  221.     long                             size;
  222.     long                             atomType;
  223.  
  224.     short                             rgnSize;
  225.     Rect                             rgnBBox;
  226.     char                             data[1];
  227. };
  228. typedef struct RgnAtom                    RgnAtom;
  229.  
  230. struct MatteCompressedAtom {
  231.     long                             size;
  232.     long                             atomType;
  233.  
  234.     long                             flags;                        /* 1 byte of version / 3 bytes of flags */
  235.  
  236.     ImageDescription                 matteImageDescription;
  237.  
  238.     char                             matteData[1];
  239. };
  240. typedef struct MatteCompressedAtom        MatteCompressedAtom;
  241.  
  242. struct MatteAtom {
  243.     long                             size;
  244.     long                             atomType;
  245.  
  246.     MatteCompressedAtom             aCompressedMatte;
  247. };
  248. typedef struct MatteAtom                MatteAtom;
  249.  
  250. struct ClippingAtom {
  251.     long                             size;
  252.     long                             atomType;
  253.  
  254.     RgnAtom                         aRgnClip;
  255. };
  256. typedef struct ClippingAtom                ClippingAtom;
  257. /***********************
  258. * Media Info Example Structures
  259. ***********************/
  260.  
  261.  
  262. struct VideoMediaInfoHeader {
  263.     long                             flags;                        /* 1 byte of version / 3 bytes of flags */
  264.  
  265.     short                             graphicsMode;                /* for QD - transfer mode */
  266.     short                             opColorRed;                    /* opcolor for transfer mode */
  267.     short                             opColorGreen;
  268.     short                             opColorBlue;
  269. };
  270. typedef struct VideoMediaInfoHeader        VideoMediaInfoHeader;
  271.  
  272. struct VideoMediaInfoHeaderAtom {
  273.     long                             size;                        /* size of Media info */
  274.     long                             atomType;                    /* = 'vmhd' */
  275.     VideoMediaInfoHeader             vmiHeader;
  276. };
  277. typedef struct VideoMediaInfoHeaderAtom    VideoMediaInfoHeaderAtom;
  278.  
  279. struct VideoMediaInfo {
  280.     long                             size;                        /* size of Media info */
  281.     long                             atomType;                    /* = 'minf' */
  282.  
  283.     VideoMediaInfoHeaderAtom         header;
  284.  
  285.     HandlerAtom                     dataHandler;
  286.  
  287.     DataInfoAtom                     dataInfo;
  288.  
  289.     SampleTableAtom                 sampleTable;
  290. };
  291. typedef struct VideoMediaInfo            VideoMediaInfo;
  292.  
  293. struct SoundMediaInfoHeader {
  294.     long                             flags;                        /* 1 byte of version / 3 bytes of flags */
  295.  
  296.     short                             balance;
  297.     short                             rsrvd;
  298. };
  299. typedef struct SoundMediaInfoHeader        SoundMediaInfoHeader;
  300.  
  301. struct SoundMediaInfoHeaderAtom {
  302.     long                             size;                        /* size of Media info */
  303.     long                             atomType;                    /* = 'vmhd' */
  304.  
  305.     SoundMediaInfoHeader             smiHeader;
  306. };
  307. typedef struct SoundMediaInfoHeaderAtom    SoundMediaInfoHeaderAtom;
  308.  
  309. struct SoundMediaInfo {
  310.     long                             size;                        /* size of Media info */
  311.     long                             atomType;                    /* = 'minf' */
  312.  
  313.     SoundMediaInfoHeaderAtom         header;
  314.  
  315.     HandlerAtom                     dataHandler;
  316.  
  317.     DataRefAtom                     dataReference;
  318.  
  319.     SampleTableAtom                 sampleTable;
  320. };
  321. typedef struct SoundMediaInfo            SoundMediaInfo;
  322. /* whatever data the media handler needs goes after the atomType */
  323.  
  324. struct MediaInfo {
  325.     long                             size;
  326.     long                             atomType;
  327. };
  328. typedef struct MediaInfo                MediaInfo;
  329. /***********************
  330. * Media Directory Structures
  331. ***********************/
  332.  
  333. struct MediaHeader {
  334.     long                             flags;                        /* 1 byte of version / 3 bytes of flags */
  335.  
  336.     long                             creationTime;                /* seconds since Jan 1904 when directory was created */
  337.     long                             modificationTime;            /* seconds since Jan 1904 when directory was appended */
  338.  
  339.     TimeValue                         timeScale;                    /* start time for Media (Media time) */
  340.     TimeValue                         duration;                    /* length of Media (Media time) */
  341.  
  342.     short                             language;
  343.     short                             quality;
  344. };
  345. typedef struct MediaHeader                MediaHeader;
  346.  
  347. struct MediaHeaderAtom {
  348.     long                             size;
  349.     long                             atomType;
  350.  
  351.     MediaHeader                     header;
  352. };
  353. typedef struct MediaHeaderAtom            MediaHeaderAtom;
  354.  
  355. struct MediaDirectory {
  356.     long                             size;
  357.     long                             atomType;                    /* = 'mdia' */
  358.  
  359.     MediaHeaderAtom                 mediaHeader;                /* standard Media information */
  360.  
  361.     HandlerAtom                     mediaHandler;
  362.  
  363.     MediaInfo                         mediaInfo;
  364. };
  365. typedef struct MediaDirectory            MediaDirectory;
  366. /***********************
  367. * Track Structures
  368. ***********************/
  369.  
  370. enum {
  371.     TrackEnable                    = 1 << 0,
  372.     TrackInMovie                = 1 << 1,
  373.     TrackInPreview                = 1 << 2,
  374.     TrackInPoster                = 1 << 3
  375. };
  376.  
  377.  
  378. struct TrackHeader {
  379.     long                             flags;                        /* 1 byte of version / 3 bytes of flags */
  380.  
  381.     long                             creationTime;                /* seconds since Jan 1904 when directory was created */
  382.     long                             modificationTime;            /* seconds since Jan 1904 when directory was appended */
  383.  
  384.     long                             trackID;
  385.  
  386.     long                             reserved1;
  387.  
  388.     TimeValue                         duration;                    /* length of track (track time) */
  389.  
  390.     long                             reserved2;
  391.     long                             reserved3;
  392.  
  393.     short                             layer;
  394.     short                             alternateGroup;
  395.  
  396.     short                             volume;
  397.     short                             reserved4;
  398.  
  399.     MatrixRecord                     matrix;
  400.     Fixed                             trackWidth;
  401.     Fixed                             trackHeight;
  402. };
  403. typedef struct TrackHeader                TrackHeader;
  404.  
  405. struct TrackHeaderAtom {
  406.     long                             size;                        /* size of track header */
  407.     long                             atomType;                    /* = 'tkhd' */
  408.  
  409.     TrackHeader                     header;
  410. };
  411. typedef struct TrackHeaderAtom            TrackHeaderAtom;
  412.  
  413. struct EditListType {
  414.     TimeValue                         trackDuration;
  415.     TimeValue                         mediaTime;
  416.     Fixed                             mediaRate;
  417. };
  418. typedef struct EditListType                EditListType;
  419.  
  420. struct EditListAtom {
  421.     long                             size;
  422.     long                             atomType;                    /* = elst */
  423.  
  424.     long                             flags;                        /* 1 byte of version / 3 bytes of flags */
  425.  
  426.     long                             numEntries;
  427.     EditListType                     editListTable[1];
  428. };
  429. typedef struct EditListAtom                EditListAtom;
  430.  
  431. struct EditsAtom {
  432.     long                             size;
  433.     long                             atomType;                    /* = edts */
  434.  
  435.     EditListAtom                     editList;
  436. };
  437. typedef struct EditsAtom                EditsAtom;
  438.  
  439. struct TrackLoadSettings {
  440.     TimeValue                         preloadStartTime;
  441.     TimeValue                         preloadDuration;
  442.     long                             preloadFlags;
  443.     long                             defaultHints;
  444. };
  445. typedef struct TrackLoadSettings        TrackLoadSettings;
  446.  
  447. struct TrackLoadSettingsAtom {
  448.     long                             size;
  449.     long                             atomType;                    /* = load */
  450.  
  451.     TrackLoadSettings                 settings;
  452. };
  453. typedef struct TrackLoadSettingsAtom    TrackLoadSettingsAtom;
  454.  
  455. struct TrackDirectory {
  456.     long                             size;
  457.     long                             atomType;                    /* = 'trak' */
  458.  
  459.     TrackHeaderAtom                 trackHeader;                /* standard track information */
  460.  
  461.     ClippingAtom                     trackClip;
  462.  
  463.     EditsAtom                         edits;
  464.  
  465.     MediaDirectory                     media;
  466.  
  467.     UserDataAtom                     userData;                    /* space for extending with new data types */
  468. };
  469. typedef struct TrackDirectory            TrackDirectory;
  470. /****************************************
  471. *
  472. *   MovieDirectory -
  473. *        The MovieDirectory is the top level structure which
  474. *        holds the TrackInstance describing where the
  475. *        TrackDirectories are.
  476. *
  477. ****************************************/
  478.  
  479. struct MovieHeader {
  480.     long                             flags;                        /* 1 byte of version / 3 bytes of flags */
  481.  
  482.     long                             creationTime;                /* seconds since Jan 1904 when directory was created */
  483.     long                             modificationTime;            /* seconds since Jan 1904 when directory was appended */
  484.  
  485.     TimeValue                         timeScale;                    /* Time specifications */
  486.     TimeValue                         duration;
  487.     Fixed                             preferredRate;                /* rate at which to play this movie */
  488.  
  489.     short                             preferredVolume;            /* volume to play movie at */
  490.     short                             reserved1;
  491.  
  492.     long                             preferredLong1;
  493.     long                             preferredLong2;
  494.  
  495.     MatrixRecord                     matrix;
  496.  
  497.     TimeValue                         previewTime;                /* time in track the proxy begins (track time) */
  498.     TimeValue                         previewDuration;            /* how long the proxy lasts (track time) */
  499.  
  500.     TimeValue                         posterTime;                    /* time in track the proxy begins (track time) */
  501.  
  502.     TimeValue                         selectionTime;                /* time in track the proxy begins (track time) */
  503.     TimeValue                         selectionDuration;            /* time in track the proxy begins (track time) */
  504.     TimeValue                         currentTime;                /* time in track the proxy begins (track time) */
  505.  
  506.     long                             nextTrackID;                /* next value to use for a TrackID */
  507. };
  508. typedef struct MovieHeader                MovieHeader;
  509.  
  510. struct MovieHeaderAtom {
  511.     long                             size;
  512.     long                             atomType;                    /* = 'mvhd' */
  513.  
  514.     MovieHeader                     header;
  515. };
  516. typedef struct MovieHeaderAtom            MovieHeaderAtom;
  517.  
  518. struct TrackDirectoryEntry {
  519.     TrackDirectory                     trackDirectory;                /* Track directory information */
  520. };
  521. typedef struct TrackDirectoryEntry        TrackDirectoryEntry;
  522.  
  523. struct MovieDirectory {
  524.     long                             size;
  525.     long                             atomType;                    /* = 'moov' */
  526.  
  527.     MovieHeaderAtom                 header;
  528.  
  529.     ClippingAtom                     movieClip;
  530.  
  531.                                                                 /* Track Directories */
  532.     TrackDirectoryEntry             track[1];                    /* Track directory information */
  533.  
  534.                                                                 /* User data for Movie */
  535.     UserDataAtom                     userData;                    /* space for user extensions */
  536. };
  537. typedef struct MovieDirectory            MovieDirectory;
  538. /****************************************
  539. ****************************************/
  540.  
  541. /* Movie formats and tags */
  542.  
  543. enum {
  544.                                                                 /* some system defined format IDs */
  545.     MOVIE_TYPE                    = FOUR_CHAR_CODE('moov'),
  546.     TRACK_TYPE                    = FOUR_CHAR_CODE('trak'),
  547.     MEDIA_TYPE                    = FOUR_CHAR_CODE('mdia'),
  548.     VIDEO_TYPE                    = FOUR_CHAR_CODE('vide'),
  549.     SOUND_TYPE                    = FOUR_CHAR_CODE('soun')
  550. };
  551.  
  552. /* atom id's */
  553.  
  554. enum {
  555.     MovieAID                    = FOUR_CHAR_CODE('moov'),
  556.     MovieHeaderAID                = FOUR_CHAR_CODE('mvhd'),
  557.     ClipAID                        = FOUR_CHAR_CODE('clip'),
  558.     RgnClipAID                    = FOUR_CHAR_CODE('crgn'),
  559.     MatteAID                    = FOUR_CHAR_CODE('matt'),
  560.     MatteCompAID                = FOUR_CHAR_CODE('kmat'),
  561.     TrackAID                    = FOUR_CHAR_CODE('trak'),
  562.     UserDataAID                    = FOUR_CHAR_CODE('udta'),
  563.     TrackHeaderAID                = FOUR_CHAR_CODE('tkhd'),
  564.     EditsAID                    = FOUR_CHAR_CODE('edts'),
  565.     EditListAID                    = FOUR_CHAR_CODE('elst'),
  566.     MediaAID                    = FOUR_CHAR_CODE('mdia'),
  567.     MediaHeaderAID                = FOUR_CHAR_CODE('mdhd'),
  568.     MediaInfoAID                = FOUR_CHAR_CODE('minf'),
  569.     VideoMediaInfoHeaderAID        = FOUR_CHAR_CODE('vmhd'),
  570.     SoundMediaInfoHeaderAID        = FOUR_CHAR_CODE('smhd'),
  571.     GenericMediaInfoHeaderAID    = FOUR_CHAR_CODE('gmhd'),
  572.     GenericMediaInfoAID            = FOUR_CHAR_CODE('gmin'),
  573.     DataInfoAID                    = FOUR_CHAR_CODE('dinf'),
  574.     DataRefAID                    = FOUR_CHAR_CODE('dref'),
  575.     SampleTableAID                = FOUR_CHAR_CODE('stbl'),
  576.     STSampleDescAID                = FOUR_CHAR_CODE('stsd'),
  577.     STTimeToSampAID                = FOUR_CHAR_CODE('stts'),
  578.     STSyncSampleAID                = FOUR_CHAR_CODE('stss'),
  579.     STSampleToChunkAID            = FOUR_CHAR_CODE('stsc'),
  580.     STShadowSyncAID                = FOUR_CHAR_CODE('stsh'),
  581.     HandlerAID                    = FOUR_CHAR_CODE('hdlr'),
  582.     STSampleSizeAID                = FOUR_CHAR_CODE('stsz'),
  583.     STChunkOffsetAID            = FOUR_CHAR_CODE('stco'),
  584.     STChunkOffset64AID            = FOUR_CHAR_CODE('co64'),
  585.     STSampleIDAID                = FOUR_CHAR_CODE('stid'),
  586.     DataRefContainerAID            = FOUR_CHAR_CODE('drfc'),
  587.     TrackReferenceAID            = FOUR_CHAR_CODE('tref'),
  588.     ColorTableAID                = FOUR_CHAR_CODE('ctab'),
  589.     LoadSettingsAID                = FOUR_CHAR_CODE('load'),
  590.     PropertyAtomAID                = FOUR_CHAR_CODE('code'),
  591.     InputMapAID                    = FOUR_CHAR_CODE('imap'),
  592.     MovieBufferHintsAID            = FOUR_CHAR_CODE('mbfh'),
  593.     MovieDataRefAliasAID        = FOUR_CHAR_CODE('mdra'),
  594.     SoundLocalizationAID        = FOUR_CHAR_CODE('sloc'),
  595.     CompressedMovieAID            = FOUR_CHAR_CODE('cmov'),
  596.     CompressedMovieDataAID        = FOUR_CHAR_CODE('cmvd'),
  597.     DataCompressionAtomAID        = FOUR_CHAR_CODE('dcom'),
  598.     ReferenceMovieRecordAID        = FOUR_CHAR_CODE('rmra'),
  599.     ReferenceMovieDescriptorAID    = FOUR_CHAR_CODE('rmda'),
  600.     ReferenceMovieDataRefAID    = FOUR_CHAR_CODE('rdrf'),
  601.     ReferenceMovieVersionCheckAID = FOUR_CHAR_CODE('rmvc'),
  602.     ReferenceMovieDataRateAID    = FOUR_CHAR_CODE('rmdr'),
  603.     ReferenceMovieComponentCheckAID = FOUR_CHAR_CODE('rmcd'),
  604.     ReferenceMovieQualityAID    = FOUR_CHAR_CODE('rmqu')
  605. };
  606.  
  607. /* Text ATOM definitions*/
  608.  
  609.  
  610. struct TextBoxAtom {
  611.     long                             size;
  612.     long                             atomType;                    /* = 'tbox' */
  613.     Rect                             textBox;                    /* New text box (overrides defaultTextBox)*/
  614. };
  615. typedef struct TextBoxAtom                TextBoxAtom;
  616.  
  617. struct HiliteAtom {
  618.     long                             size;
  619.     long                             atomType;                    /* = 'hlit' */
  620.     long                             selStart;                    /* hilite selection start character*/
  621.     long                             selEnd;                        /* hilite selection end character*/
  622. };
  623. typedef struct HiliteAtom                HiliteAtom;
  624.  
  625. struct KaraokeRec {
  626.     TimeValue                         timeVal;
  627.     short                             beginHilite;
  628.     short                             endHilite;
  629. };
  630. typedef struct KaraokeRec                KaraokeRec;
  631.  
  632. struct KaraokeAtom {
  633.     long                             numEntries;
  634.     KaraokeRec                         karaokeEntries[1];
  635. };
  636. typedef struct KaraokeAtom                KaraokeAtom;
  637. /* for ReferenceMovieDataRefRecord.flags*/
  638.  
  639. enum {
  640.     kDataRefIsSelfContained        = (1 << 0)
  641. };
  642.  
  643.  
  644. struct ReferenceMovieDataRefRecord {
  645.     long                             flags;
  646.     OSType                             dataRefType;
  647.     long                             dataRefSize;
  648.     char                             dataRef[1];
  649. };
  650. typedef struct ReferenceMovieDataRefRecord ReferenceMovieDataRefRecord;
  651. /* for VersionCheckRecord.checkType*/
  652.  
  653. enum {
  654.     kVersionCheckMin            = 0,                            /* val1 is the min. version required*/
  655.     kVersionCheckMask            = 1                                /* (gestalt return value & val2) must == val1*/
  656. };
  657.  
  658.  
  659. struct QTAltVersionCheckRecord {
  660.     long                             flags;                        /* currently always 0*/
  661.     OSType                             gestaltTag;
  662.     UInt32                             val1;
  663.     UInt32                             val2;
  664.     short                             checkType;
  665. };
  666. typedef struct QTAltVersionCheckRecord    QTAltVersionCheckRecord;
  667. /* some helpful constants for DataRateRecord.dataRate */
  668.  
  669. enum {
  670.     kDataRate144ModemRate        = 1400,
  671.     kDataRate288ModemRate        = 2800,
  672.     kDataRateISDNRate            = 5600,
  673.     kDataRateDualISDNRate        = 11200,
  674.     kDataRateT1Rate                = 150000L,
  675.     kDataRateInfiniteRate        = 0x7FFFFFFF
  676. };
  677.  
  678.  
  679. struct QTAltDataRateRecord {
  680.     long                             flags;                        /* currently always 0*/
  681.     long                             dataRate;
  682. };
  683. typedef struct QTAltDataRateRecord        QTAltDataRateRecord;
  684.  
  685. struct QTAltComponentCheckRecord {
  686.     long                             flags;                        /* currently always 0 */
  687.     ComponentDescription             cd;
  688.     unsigned long                     minVersion;
  689. };
  690. typedef struct QTAltComponentCheckRecord QTAltComponentCheckRecord;
  691.  
  692.  
  693. #if PRAGMA_STRUCT_ALIGN
  694.     #pragma options align=reset
  695. #elif PRAGMA_STRUCT_PACKPUSH
  696.     #pragma pack(pop)
  697. #elif PRAGMA_STRUCT_PACK
  698.     #pragma pack()
  699. #endif
  700.  
  701. #ifdef PRAGMA_IMPORT_OFF
  702. #pragma import off
  703. #elif PRAGMA_IMPORT
  704. #pragma import reset
  705. #endif
  706.  
  707. #ifdef __cplusplus
  708. }
  709. #endif
  710.  
  711. #endif /* __MOVIESFORMAT__ */
  712.  
  713.